.class Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;
.super Landroid/widget/BaseAdapter;
.source "NiceAppAboutUsActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "AboutAdapter"
.end annotation


# instance fields
.field private mAboutModels:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;",
            ">;"
        }
    .end annotation
.end field

.field private mContext:Landroid/content/Context;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mImageWidth:I

.field private mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private metrics:Landroid/util/DisplayMetrics;

.field final synthetic this$0:Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity;


# direct methods
.method public constructor <init>(Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity;Landroid/content/Context;Ljava/util/ArrayList;)V
    .registers 9
    .param p1, "this$0"    # Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity;
    .param p2, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p3, "aboutModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;>;"
    const/4 v3, 0x1

    .line 158
    iput-object p1, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->this$0:Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 156
    new-instance v2, Landroid/util/DisplayMetrics;

    invoke-direct {v2}, Landroid/util/DisplayMetrics;-><init>()V

    iput-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->metrics:Landroid/util/DisplayMetrics;

    .line 159
    iput-object p2, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mContext:Landroid/content/Context;

    .line 160
    iput-object p3, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mAboutModels:Ljava/util/ArrayList;

    .line 161
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v2

    iput-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 163
    new-instance v2, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    sget-object v3, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    .line 164
    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    new-instance v3, Lcom/nostra13/universalimageloader/core/display/FadeInBitmapDisplayer;

    const/16 v4, 0x12c

    invoke-direct {v3, v4}, Lcom/nostra13/universalimageloader/core/display/FadeInBitmapDisplayer;-><init>(I)V

    .line 165
    invoke-virtual {v2, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v2

    iput-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 167
    check-cast p2, Landroid/app/Activity;

    .end local p2    # "context":Landroid/content/Context;
    invoke-virtual {p2}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v2

    invoke-interface {v2}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v2

    iget-object v3, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->metrics:Landroid/util/DisplayMetrics;

    invoke-virtual {v2, v3}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 168
    iget-object v2, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->metrics:Landroid/util/DisplayMetrics;

    iget v1, v2, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 169
    .local v1, "screenWidth":I
    invoke-virtual {p1}, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const/high16 v3, 0x7f090000

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    .line 170
    .local v0, "marginOffset":I
    mul-int/lit8 v2, v0, 0x2

    sub-int v2, v1, v2

    iput v2, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mImageWidth:I

    .line 171
    return-void
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 175
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mAboutModels:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 180
    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 185
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 12
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 190
    if-nez p2, :cond_e

    .line 191
    new-instance v1, Landroid/widget/ImageView;

    iget-object v4, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mContext:Landroid/content/Context;

    invoke-direct {v1, v4}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 192
    .local v1, "aboutImg":Landroid/widget/ImageView;
    const/4 v4, 0x1

    invoke-virtual {v1, v4}, Landroid/widget/ImageView;->setAdjustViewBounds(Z)V

    .line 194
    move-object p2, v1

    .line 197
    .end local v1    # "aboutImg":Landroid/widget/ImageView;
    :cond_e
    iget-object v4, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mAboutModels:Ljava/util/ArrayList;

    invoke-virtual {v4, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;

    .line 198
    .local v0, "about":Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;
    iget v4, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mImageWidth:I

    int-to-float v4, v4

    iget v5, v0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;->width:I

    int-to-float v5, v5

    div-float/2addr v4, v5

    iget v5, v0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;->height:I

    int-to-float v5, v5

    mul-float/2addr v4, v5

    float-to-int v2, v4

    .line 200
    .local v2, "imageHeight":I
    invoke-virtual {p2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v3

    check-cast v3, Landroid/widget/AbsListView$LayoutParams;

    .line 201
    .local v3, "params":Landroid/widget/AbsListView$LayoutParams;
    if-nez v3, :cond_41

    .line 202
    new-instance v3, Landroid/widget/AbsListView$LayoutParams;

    .end local v3    # "params":Landroid/widget/AbsListView$LayoutParams;
    iget v4, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mImageWidth:I

    invoke-direct {v3, v4, v2}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    .line 207
    .restart local v3    # "params":Landroid/widget/AbsListView$LayoutParams;
    :goto_31
    invoke-virtual {p2, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 209
    iget-object v5, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    iget-object v6, v0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutModel;->imageUrl:Ljava/lang/String;

    move-object v4, p2

    check-cast v4, Landroid/widget/ImageView;

    iget-object v7, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v5, v6, v4, v7}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 210
    return-object p2

    .line 204
    :cond_41
    iget v4, p0, Lcom/brixd/niceapp/activity/NiceAppAboutUsActivity$AboutAdapter;->mImageWidth:I

    iput v4, v3, Landroid/widget/AbsListView$LayoutParams;->width:I

    .line 205
    iput v2, v3, Landroid/widget/AbsListView$LayoutParams;->height:I

    goto :goto_31
.end method
